<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form action="update_myuploads.html" method="post">
<table cellpadding="0" cellspacing="0" width="600" align="center" border="0">
<c:forEach var="x" begin="0" end="${fn:length(data)-1}" step="1" varStatus ="status">
	<tr align="center"><td colspan="2" style="color: #333;" height="30"><b><u>Edit Myupload</u></b></td></tr>
	<tr><td colspan="2"><input name="txtid" type="hidden" value="${data[x].FILE_ID}"/></td></tr>
	<tr>
		<td width="20%" height="30" align="right" style="color: #666;">File Name:&nbsp;</td>	
		<td width="80%" align="left"><input name="txtname" readonly="readonly" class="box" type="text" value="${data[x].FILE_NAME}"></td>
	</tr>
	<tr>
		<td  height="30" align="right" style="color: #666;">File Title:&nbsp;</td>	
		<td  align="left"><input name="txttitle" maxlength="255" class="box" type="text" value="${data[x].FILE_TITLE}"></td>
	</tr>
	<tr>
		<td width="30%" height="30" align="right" style="color: #666;font-family: verdana, sans-serif;font-size:11px;">File Category:&nbsp;</td>	
		<td width="70%" align="left">
			<select name="txtcat" style="height:20px;">
				<c:forEach var="i" begin="0" end="${fn:length(categories)-1}" step="1" varStatus ="status">
					<c:choose>
						<c:when test="${data[x].CATEGORY_ID==categories[i].CATEGORY_ID}">
							<option selected="selected" value="${categories[i].CATEGORY_ID}"><c:out value="${categories[i].CATEGORY_NAME}"/></option>			
						</c:when>
						<c:otherwise>
							<option value="${categories[i].CATEGORY_ID}"><c:out value="${categories[i].CATEGORY_NAME}"/></option>			
						</c:otherwise>
					</c:choose>
					
				
				</c:forEach>
			</select>
		</td>
	</tr>
	
	<tr>
		<td  align="right" style="color: #666;">Short Description:&nbsp;</td>	
		<td  align="left"><textarea name="txtshortdesc" rows="2" style="font-family: verdana, sans-serif;font-size:11px;width: 300px;"><c:out value="${data[x].FILE_SHORT_DESC}"></c:out></textarea></td>
	</tr>
	<tr><td colspan="2" height="5"> </td></tr>
	<tr>
		<td align="right" style="color: #666;">Full Description:&nbsp;</td>	
		<td align="left"><textarea name="txtfulldesc" rows="10" style="font-family: verdana, sans-serif;font-size:11px;width: 300px;"><c:out value="${data[x].FILE_FULL_DESC}"></c:out></textarea></td>
	</tr>
	<tr><td colspan="2" height="5"> </td></tr>
	<tr>
		<td colspan="2" align="center" height="30"><input type="submit" value="Save">&nbsp;&nbsp;<input type="button" onclick='window.location="myuploads.html"' value="Back"></td>
	</tr>
	<tr><td colspan="2" height="25">&nbsp;</td></tr>
</c:forEach>
</table>
</form>
</body>
</html>